package com.study_online.mapper;

import com.study_online.domain.AdminNotice;
import com.study_online.domain.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.study_online.domain.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 张天霸
 */

@Repository
public interface UserMapper extends MyBaseMapper<User> {


    public List<User> selectList(String tablename);

    /**
     * 用户登录
     * username password
     */
    public User logining(String account,String password);

    public User login(String username,String password);

    /**
     * 根据邮箱查询
     * @param email
     * @return
     */
    public User findEmail(String email);

    public User findUsername(String username);

    /**
     * 注册用户
     *
     * @param user
     */

    public void register(User user);

    /**
     * 首页视频展示
     * @return
     */
   /* public List<AdminVideo> selectAdminVideoList();*/
    public Video selectVideoList(Integer videoId);

    /**
     * 首页公告展示
     * @return
     */
    public Notice selectNoticeList(Integer noticeId);


    public List<Video> selectHomeVideo();
}
